// $codepro.audit.disable numericLiterals
/**
 * Test file for M6
 */
package edu.gatech.coc.betameisters.test;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JTable;

import edu.gatech.coc.betameisters.infoholders.Invoice;
import edu.gatech.coc.betameisters.userinterfaces.InvoiceView;

/**
 * Tester for Invoice.java and InvoiceViewer.java
 * 
 * @author Suren
 * 
 * @version $Revision: 1.0 $
 */
public class InvoiceTester {
	/**
	 * Main method
	 * 
	 * @param args
	 *            no arguments needed
	 */
	public static void main(String[] args) {
		final JFrame f = new JFrame("Sample Invoice");
		final Invoice myI = new Invoice("");
		myI.setDate("10/15/20");
		myI.setDoctor("Dr Mighty Smith");
		myI.setHospitalName("Road Health Center");
		final String[][] rData = new String[4][4];
		final String[] cData = new String[2];
		cData[0] = "Items";
		cData[1] = "Total";
		rData[0][0] = "Tetanus Vaccine";
		rData[0][1] = "10.00";
		rData[1][0] = "X Ray Scan";
		rData[1][1] = "190.00";
		rData[2][0] = "Doctor's Charges";
		rData[2][1] = "200.00";
		rData[3][0] = "Health Tax";
		rData[3][1] = "100.00";
		myI.setTotalAmount("500.00$");
		myI.setMyNurse("Peter Deng");
		myI.setPatientName("Suren Nihalani");
		final JTable billingTable = new JTable(rData, cData);
		myI.setParticulars(billingTable);
		final InvoiceView view = new InvoiceView(myI, null);
		f.setPreferredSize(new Dimension(550, 510));
		f.pack();
		f.getContentPane().add(view);
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setVisible(true);
	}

	/**
	 * Method toString.
	 * 
	 * 
	 * @return String
	 */
	public String toString() {
		return "InvoiceTest";
	}
}
